<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<title>Basic Alert</title>
<script language="JavaScript">

function notify(data) {
	var element = document.getElementById("newFriend");
	element.setAttribute("name", data.name);
	element.setAttribute("title", data.title);
	element.setAttribute("message", data.message);
	element.setAttribute("image", data.image);
	
	var evt = document.createEvent("Events");
	evt.initEvent("WNNotifyEvent", true, false);
	element.dispatchEvent(evt);	
}

var i = 0;
</script>

</head>
<body><div id="canvas">

<notifyEvent id="newFriend" />
<a href="javascript:notify({title:'Hello',message:'Greetings'})">Notify</a>
<a href="javascript:notify({
	name		: i++,
	title 	: 'Hello',
	message : 'Greetings',
	image		: 'http://profile.ak.fbcdn.net/object3/1575/34/q16972274487_9785.jpg'})">Notify</a>

</div></body></html>